import { createApp } from "vue";
import Vconsole from "vconsole";
import AppComponent from "./App.vue";
import router from "./router";
import store from "./store";
import globalComponents from "@/globalComponents/index";
import testComponents from "@/testComponents/index";
import "lib-flexible/flexible.js";
import "@/assets/scss/normalize.scss";
import "animate.css";
// import "./ts-study";
// import "./testfloder";

declare module "@vue/runtime-core" {
  interface ComponentCustomProperties {
    $http: any;
  }
}

function init() {
  new Vconsole();

  const app = createApp(AppComponent);

  app.config.globalProperties.$http = () => {
    console.log("$http");
  };
  // =>  Vue.config.$http = ()=>{}

  app
    .use(store)
    .use(router)
    .use(testComponents)
    .use(globalComponents)
    .mount("#app");
}
init();
